package com.tc.travel.util;

import java.util.Random;
import org.apache.log4j.Logger;

public class SleepUtil {
	private static Logger log = Logger.getLogger(SleepUtil.class);
	
	public static void sleepRandom(int secondLow, int secondHigh) {
		Random random = new Random();
		int seconds = random.nextInt(secondHigh - secondLow) + secondLow;
		log.info("sleep: " + seconds + " seconds");


		try {
			Thread.sleep(seconds * 1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
